import { Prop, getModelForClass } from "@typegoose/typegoose";



export class Collect {

    @Prop({ tyep: String, required: true })
    user_id
    @Prop({ type: String, required: true })
    food_id
    @Prop({ type: String, default: Date.now() })
    collect_time
}

export const CollectModel = getModelForClass(Collect, {
    //为模型取名,默认为类的名字+s
    schemaOptions: { collection: 'collect' },
})